import request from '@/utils/request'

// 查询视频号小店开通列表
export function listChannelsMail(query) {
  return request({
    url: '/channelsMail/channelsMail/list',
    method: 'get',
    params: query
  })
}

// 查询视频号小店开通详细
export function getChannelsMail(id) {
  return request({
    url: '/channelsMail/channelsMail/' + id,
    method: 'get'
  })
}

// 新增视频号小店开通
export function addChannelsMail(data) {
  return request({
    url: '/channelsMail/channelsMail',
    method: 'post',
    data: data
  })
}

// 视频号创建商品
export function createShop(data) {
  return request({
    url: '/channelsMail/channelsMail/createShop',
    method: 'post',
    timeout: 120 * 1000,
    data: data
  })
}
//根据视频号类型选择开通对应的内容
export function exclusiveInfo(data) {
  return request({
    url: '/channelsMail/channelsMail/exclusiveInfo',
    method: 'post',
    timeout: 120 * 1000,
    data: data
  })
}


// 视频号创建商品
export function batchAdd(data) {
  return request({
    url: '/channelsMail/channelsMail/batchAdd',
    method: 'post',
    timeout: 120 * 1000,
    data: data
  })
}

// 修改视频号小店开通
export function updateChannelsMail(data) {
  return request({
    url: '/channelsMail/channelsMail',
    method: 'put',
    data: data
  })
}

// 删除视频号小店开通
export function delChannelsMail(id) {
  return request({
    url: '/channelsMail/channelsMail/' + id,
    method: 'delete'
  })
}
